/**
 * Created by gemini on 2017/4/19.
 */
myApp.controller('loginCtrl',function ($scope,$state,$cookieStore,memberService) {
    $scope.user = {
        mobile:15151004900,
        password:"abc1234"
    };
    $scope.login = function () {
        memberService.login($scope.user.mobile,$scope.user.password,function (data) {
            if(!data.errno == 0){
                alert(data.errmsg);
            }else{
                $cookieStore.put("operator",data.data);
                //console.log($cookieStore.get("operator"));
                $state.go('main');
            }
        });
    };

});